gdkwindow-wayland: Don't post CONFIGURE events for the same size
authorJasper St. Pierre <jstpierre@mecheye.net>
Thu, 19 Jun 2014 18:31:23 +0000 (14:31 -0400)
committerJasper St. Pierre <jstpierre@mecheye.net>
Thu, 19 Jun 2014 18:56:16 +0000 (14:56 -0400)
The Wayland compositor is completely allowed to send us configure
events for the same size, and this validly happens if we're changing
states. Fizzle these out.

gdk/wayland/gdkwindow-wayland.c

index 8abfdd41169ae89b7012fc83c17ab0eeccc9d7f6..a9a2dc6ff203e2dec837a63fcbd88a66887e134f 100644 (file)
@@ -596,11 +596,11 @@ gdk_wayland_window_configure (GdkWindow *window,
   GdkDisplay *display;
   GdkEvent *event;
 
+  if (window->width == width && window->height == height)
+    return;
+
   display = gdk_window_get_display (window);
 
-  /* TODO: Only generate a configure event if width/height/scale have actually
-   * changed?
-   */
   event = gdk_event_new (GDK_CONFIGURE);
   event->configure.window = window;
   event->configure.send_event = FALSE;